#!/bin/bash
clear
if [ $# -eq 0]
then

# define varible
reset_terminal=$(tput sgr0)

#check os type
	os=$(uname -o)
echo $os
#check os release version and name
	os_name=$(cat /etc/issue| grep -e "Server")
	echo $os_name
#check arch
	architecture=$(uname -m)
	echo $architecture
#check kernel Release
	kernerrelease=$(uname -r)
	echo $kernerrelease
#check hostname
	hostname=$HOSTNAME
	echo $hostname
	#uname -n
#check Internal IP
	internalip=$(hostname -I)
	echo $internalip
#check External IP
	external=$(curl -s http:ipecho.net/plain)
	echo $external
#check DNS
#check if connected to INternet or not 
	ping -C 2 imooc.com &>/dev/null && echo "Internet:OK!" || echo "INternet:Failed"
#check logged In Users
	who>/tmp/who
	echo "Logged In Users" && cat /tmp/who
	rm -f /tmp/who
fi
